package com.xianye.erp.service.product.impl;

import java.util.List;

import javax.annotation.Resource;

import com.xianye.erp.dao.base.DaoSupport;
import com.xianye.erp.service.product.ProductManager;
import com.xianye.erp.util.PageData;
import org.springframework.stereotype.Service;




/** 
 * 说明： 
 * 创建时间：2016-04-08
 * @version
 */
@Service("productService")
public class ProductService implements ProductManager {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	@Override
	public void save(PageData pd) throws Exception {
		dao.save("ProductMapper.save", pd);
	}
	@Override
	public void batchSave(List<PageData> pds)throws Exception{
		dao.save("ProductMapper.batchSave", pds);
	}
	public void batchUpdate(List<PageData> pds)throws Exception{
		dao.batchUpdate("ProductMapper.edit", pds);
	}
	
	
	@Override
	public void save_img(PageData pd) throws Exception {
		dao.save("ProductImgMapper.save", pd);
	}
	@Override
	public void batchSave_img(List<PageData> pds)throws Exception{
		dao.save("ProductImgMapper.batchSave", pds);
	}
	@Override
	public void batchDelete_img(List<String> pds)throws Exception{
		dao.batchDelete("ProductImgMapper.batchDelete", pds);
	}	
	@Override
	public void delete_img(PageData pd) throws Exception {
		dao.delete("ProductImgMapper.delete", pd);
	}
	
	@Override
	public void save_property(PageData pd) throws Exception {
		dao.save("ProductPropertyMapper.save", pd);
	}
	@Override
	public void delete_property(PageData pd) throws Exception {
		dao.delete("ProductPropertyMapper.delete", pd);
	}
	@Override
	public void batchSave_property(List<PageData> pds)throws Exception{
		dao.save("ProductPropertyMapper.batchSave", pds);
	}
	@Override
	public void batchDelete_property(List<String> pds)throws Exception{
		dao.batchDelete("ProductPropertyMapper.batchDelete", pds);
	}
	
	@Override
	public void save_Multimedia(PageData pd) throws Exception {
		dao.save("ProductMultimediaMapper.save", pd);
	}
	@Override
	public void delete_Multimedia(PageData pd) throws Exception {
		dao.delete("ProductMultimediaMapper.delete", pd);
	}
	@Override
	public void save_sku(PageData pd) throws Exception {
		dao.save("ProductSkuMapper.save", pd);
	}
	@Override
	public void delete_sku(PageData pd) throws Exception {
		dao.delete("ProductSkuMapper.delete", pd);
	}
	@Override
	public void batchSave_sku(List<PageData> pds)throws Exception{
		dao.save("ProductSkuMapper.batchSave", pds);
	}
	@Override
	public void batchDelete_sku(List<String> pds)throws Exception{
		dao.batchDelete("ProductSkuMapper.batchDelete", pds);
	}
	
	@Override
	public void save_sku_property(PageData pd) throws Exception {
		dao.save("ProductSkuPropertyMapper.save", pd);
	}
	@Override
	public void delete_sku_property(PageData pd) throws Exception {
		dao.delete("ProductSkuPropertyMapper.delete", pd);
	}
	@Override
	public void batchSave_sku_property(List<PageData> pds)throws Exception{
		dao.save("ProductSkuPropertyMapper.batchSave", pds);
	}
	@Override
	public void batchDelete_sku_property(List<String> pds)throws Exception{
		dao.batchDelete("ProductSkuPropertyMapper.batchDelete", pds);
	}
	
	@Override
	public void edit(PageData pd)throws Exception{
		dao.update("ProductMapper.edit", pd);
	}
	@Override
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("ProductMapper.findById", pd);
	}
	@Override
	public PageData findByProductId(PageData pd) throws Exception {
		return (PageData)dao.findForObject("ProductMapper.findByProductId", pd);
	}
	





	

	
	
	
}

